//
//  multidimensionalArrays.cpp
//  learnC++
//
//  Created by apple on 2018/5/28.
//  Copyright © 2018年 yunfan.com. All rights reserved.
//

#include "multidimensionalArrays.hpp"


void test_multidemensional_arr(){
    //多维数组仅可省略左边的数字 如arr[][5],
    //多维数组实际上就是数组里面的每个元素也是数组
    int arr[3][5] = {
        {1,2},
        {6,7,8},
        {3,4,5},
    };
    for (int row = 0; row < 3; ++row) // step through the rows in the array
        for (int col = 0; col < 5; ++col) // step through each element in the row
            std::cout << arr[row][col] << std::endl;
}

